using System.Diagnostics;
using System;
//using Linq;
using System.Windows.Forms;
using System.Collections;
using System.Drawing;
using Microsoft.CSharp;
using System.Data;
using System.Collections.Generic;
//using Linq;

	public partial class frmLicencia
	{
		public frmLicencia()
		{
			InitializeComponent();
		}
		
		private void frmLicencia_Load(object sender, System.EventArgs e)
		{
			string strCadenaSerial;
			string strClave = "SCP";
			//'
			strCadenaSerial = clsEncriptacion.EncriptarCadena(DateTime.Now.ToString(), strClave);
			txtNumeroSerieGenerado.Text = strCadenaSerial.Substring(0, 4) + "-" + strCadenaSerial.Substring(4, 4) + "-" + strCadenaSerial.Substring(8, 4) + "-" + strCadenaSerial.Substring(12, 4);
			//
			lblNumeroSerieIntroducido.Visible = clsVariables.bol_Pruebas;
			strCadenaSerial = clsEncriptacion.EncriptarCadena(DateTime.Now.AddDays(2).ToString(), strClave);
			lblNumeroSerieIntroducido.Text = strCadenaSerial.Substring(0, 4) + "-" + strCadenaSerial.Substring(4, 4) + "-" + strCadenaSerial.Substring(8, 4) + "-" + strCadenaSerial.Substring(12, 4);
		}
		
		public void btnValidar_Click(System.Object sender, System.EventArgs e)
		{
			lblMensaje.Text = lblNumeroSerieIntroducido.Text == txtNumeroSerieIntroducido.Text ? "Correcto" : "Incorrecto";
		}
	}
